package com.yesep.learn.design.behavioral.command;

public class LightOnCommand implements ICommand {
    private final IDevice device;

    public LightOnCommand(IDevice device) {
        this.device = device;
    }

    @Override
    public void execute() {
        device.turnOn();
    }

    @Override
    public void undo() {
        device.turnOff();
    }
}